import request from '@/utils/request'

// 查询 DrinkingWaterSegment 树
export function getDrinkingWaterSegmentTree(params) {
  return request({
    url: '/drink/segment/drinkSegmentTree',
    method: 'get',
    params
  })
}

// /drink/drinksource/getInfo/{id}
export function getDrinkingWaterSourceInfo(params) {
  return request({
    url: '/drink/drinksource/getInfo/' + params,
    method: 'get',
  })
}

// /drink/intake/list
export function getDrinkingWaterIntakeList(params) {
  return request({
    url: '/drink/intake/list',
    method: 'get',
    params
  })
}

// /drink/intake/edit
export function editDrinkingWaterIntakeInfo(params) {
  return request({
    url: '/drink/intake/edit',
    method: 'post',
    data: params
  })
}

// /drink/intake/add
export function addDrinkingWaterIntakeInfo(params) {
  return request({
    url: '/drink/intake/add',
    method: 'post',
    data: params
  })
}

// /drink/intake/remove/{ids}
export function removeDrinkingWaterIntakeInfo(ids) {
  return request({
    url: `/drink/intake/remove/${ids}`,
    method: 'get',
  })
}

// /drink/drinksource/list
export function getDrinkingWaterSourceList(params) {
  return request({
    url: '/drink/drinksource/list',
    method: 'get',
    params
  })
}